Foundry data-plane: add draft flag to Agent versions#43979
Conversation
Next Steps to MergeImportant checks have failed. As of today they are not blocking this PR, but in near future they may.Addressing the following failures is highly recommended:
Comment generated by summarize-checks workflow run. |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews
Comment generated by After APIView workflow run. |
CI failures - analysis (not blocking)The red checks here are pre-existing tooling false positives for the ai-foundry/Foundry tree, not real issues with this PR.
|
| Schema | Change | Compatibility |
|---|---|---|
CreateAgentVersionRequest |
+ optional draft?: boolean = false |
additive |
CreateAgentRequest |
+ optional draft (via spread) |
additive |
UpdateAgentRequest |
draft deliberately omitted via OmitProperties — updates always produce non-draft versions |
no change |
AgentVersionObject |
+ optional draft?: boolean = false |
additive |
- No
required[]changes - No removals, renames, or type changes
- Optional on both request and response
There was a problem hiding this comment.
Pull request overview
This PR adds a new optional draft: boolean flag (default false) to Foundry Agents’ version models to distinguish draft/candidate versions from released versions, and regenerates the OpenAPI outputs for v1 and virtual-public-preview.
Changes:
- Added
draft?: boolean = falsetoCreateAgentVersionRequest(request) andAgentVersionObject(response) in TypeSpec. - Updated
UpdateAgentRequestto omit thedraftfield viaOmitProperties<..., "draft">. - Regenerated OpenAPI 3 documents (
v1andvirtual-public-preview) to include the newdraftproperty in the affected schemas.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| specification/ai-foundry/data-plane/Foundry/src/agents/models.tsp | Introduces the draft flag on agent version request/response models; changes update request composition. |
| specification/ai-foundry/data-plane/Foundry/openapi3/virtual-public-preview/microsoft-foundry-openapi3.json | Emitter output reflecting the new draft property in preview OpenAPI schemas. |
| specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.json | Emitter output reflecting the new draft property in v1 OpenAPI schemas. |
636130f to
0fb76f9
Compare
7c4d7b7 to
9929c46
Compare
ravimeda
left a comment
There was a problem hiding this comment.
ARM API Review
Posting findings from the ARM API Reviewer agent (critic-verified, 1 iteration, converged) against commit 99b9034. See inline comments for findings 1-2.
|
@ravimeda can you please do another review. Thanks |
Adds an optional `draft: boolean` (default false) to: - CreateAgentVersionRequest - CreateAgentRequest (via spread) - AgentVersionObject (response) Excluded from UpdateAgentRequest via OmitProperties — draft is immutable once set at version-creation time. Also adds `include_drafts` query parameter to listAgentVersions. Draft versions are excluded from listings by default. Fully additive — no required[] changes, no removals.
Summary
Adds an optional
draft: boolean(defaultfalse) to the Foundry Agentdata-plane models so callers can mark a version as a draft/candidate
distinct from the version identifier itself.
Models updated (
specification/ai-foundry/data-plane/Foundry/src/agents/models.tsp)CreateAgentVersionRequest— addeddraft?: boolean = false.Propagates automatically to
CreateAgentRequestandUpdateAgentRequestvia
...CreateAgentVersionRequestspread.AgentVersionObject(response) — addeddraft?: boolean = false.Semantics
false.PATCH creates a new version, so customers re-state
draftper call).but excluded from default
latestresolution and are notauto-promoted.
Why a flag, not an identifier convention
This metadata flag is intentionally decoupled from the version-identifier
scheme (e.g. integer vs
major.minorvsdraft-{timestamp}). Callersneed a stable, explicit way to express "this is a candidate" without
overloading the identifier.
Compatibility
Fully additive:
required[]changes.v1andvirtual-public-previewswaggers updated by theemitter; diff is pure additions.
Validation
npx tsp compile .(fromdata-plane/Foundry) — compiles cleanly,no warnings.
npx tsp formaton the edited file — no formatting changes.Related
repo (internal): PR 2147685 (design), PR 2151464 (data-plane plumbing).